﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Gmmy.Utility;
using Host.Dto;
using Surging.Core.CPlatform.Ioc;

namespace Host
{
    public interface IBaseModule: IServiceKey
    {
        /// <summary>
        /// 创建用户TokenCache
        /// </summary>
        /// <param name="data"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        Task CreateCacheToken(object data, CustomApiResult result);
        /// <summary>
        /// 移出用户TokenCache
        /// </summary>
        /// <param name="token"></param>
        Task RemoveTokenCache(string token);
        /// <summary>
        /// 检测用户TokenCache是否失效
        /// </summary>
        /// <param name="token"></param>
        /// <param name="jwtToken"></param>
        /// <returns></returns>
        Task<CheckTokenCacheDto> CheckTokenCache(string token);
        /// <summary>
        /// 获取所有用户角色权限
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<FullLoginInfoDto> GetUserRoleCache(List<string> token);
        /// <summary>
        /// 获取所有已注册模块地址
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<List<string>> GetAllModuleAddress(List<string> token);
    }
}
